package com.coldchain.auth.module.client.service;

import com.coldchain.auth.jwt.user.JwtAuthenticationRequest;

/**
 * @ClassName IAuthService

 * @Author fangliai
 * @Date 2018/8/29 9:15
 * @Vesion 1
**/
 public interface IAuthService {
  /**
   * 密码登录
   * @return
   * @throws Exception
   */
  String login(JwtAuthenticationRequest authenticationRequest) throws Exception;

  /**
   * 刷新toker
   * @param oldToken
   * @return 返回token 字符串
   * @throws Exception
   */
  String refresh(String oldToken) throws Exception;

  /**
   *验证token
   * @param token
   * @throws Exception
   */
  void validate(String token) throws Exception;

  Boolean invalid(String token) throws Exception;
 }